import datetime
import pytz


def timestamp_trans(timestamp: int) -> datetime.datetime:
    beijing_tz = pytz.timezone('Asia/Shanghai')
    beijing_time = datetime.datetime.fromtimestamp(timestamp, beijing_tz)
    return beijing_time

def beijing_time_trans(beijing_time: datetime.datetime) -> int:
    timestamp = int(beijing_time.timestamp())
    return timestamp